/*
 *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions are met:
 *
 *  Redistributions of source code must retain the above copyright notice,
 *  this list of conditions and the following disclaimer.
 *  Redistributions in binary form must reproduce the above copyright
 *  notice, this list of conditions and the following disclaimer in the
 *  documentation and/or other materials provided with the distribution.
 *  Neither the name of the dreamlu.net developer nor the names of its
 *  contributors may be used to endorse or promote products derived from
 *  this software without specific prior written permission.
 *  Author: Chill 庄骞 (smallchill@163.com)
 */
package com.plian.system.entity.fr.evaluation;

import com.baomidou.mybatisplus.annotation.FieldStrategy;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.plian.system.mybatis.base.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.format.annotation.DateTimeFormat;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * 资产评估项目核准与备案实体类
 *
 * @author jianglei
 * @since 2019-10-21
 */
@Data
@TableName("fr_evaluation_approval")
@EqualsAndHashCode(callSuper = true)
public class EvaluationApproval extends BaseEntity {

	private static final long serialVersionUID = 1L;

	/**
	 * 单据编码
	 */
	private String code;

	/**
	 * 上游单据编码
	 */
	private String upstreamCode;
	/**
	 * 上游单据编码id
	 */
	@JsonSerialize(
		using = ToStringSerializer.class
	)
	private Long upstreamCodeId;
	/**
	 * 核准or备案 1代表核准 2代表备案
	 */
	private Integer approvalOrFiling;
	/**
	* 核准编号
	*/
		private String approvalCode;
	/**
	* 备案编号
	*/
		private String filingCode;
	/**
	* 资产占有单位
	*/

		private String possessionCompanyId;
	/**
	* 企业级次
	*/

		private String enterpriseRankId;
	/**
	* 集团公司（有关部门）
	*/
		private String groupDepartmentId;
	/**
	* 资产所在地
	*/

		private String assetLocation;
	/**
	* 评估目的
	*/
		private String evaluationPurpose;
	/**
	* 经济行为类型
	*/
		private String activityTypeId;
	/**
	* 评估范围
	*/
		private String evaluationRangeId;
	/**
	* 主要评估方法
	*/
		private String evaluationMethod;
	/**
	* 评估机构名称
	*/
		private String institutionNameId;
	/**
	* 资质证书编号
	*/
		private String qualificationCertificateCode;
	/**
	* 申报核准联系人
	*/
		private String declareApprovalContact;
	/**
	* 申报核准联系人联系方式
	*/

		private String approvalContactInformation;
	/**
	* 评估基准日
	*/
	@DateTimeFormat(
		pattern = "yyyy-MM-dd HH:mm:ss"
	)
	@JsonFormat(
		pattern = "yyyy-MM-dd HH:mm:ss"
	)
	@TableField(value = "evaluation_base_date",updateStrategy = FieldStrategy.IGNORED)
		private Date evaluationBaseDate;
	/**
	* 版本号
	*/
		private String version;
	/**
	* 审批人
	*/
		private String approvedUser;
	/**
	* 审批时间
	*/
	@DateTimeFormat(
		pattern = "yyyy-MM-dd HH:mm:ss"
	)
	@JsonFormat(
		pattern = "yyyy-MM-dd HH:mm:ss"
	)
		private Date approvedTime;
	/**
	* 审批意见
	*/
		private String approvedOpinion;
	/**
	* 乐观锁字段
	*/
		private Integer tsVersion;
	/**
	* 审批流主键
	*/
		private String formType;
	/**
	* 评估机构名称
	*/
		private String def1;
	/**
	* 备选2
	*/
		private String def2;
	/**
	* 备选3
	*/
		private String def3;
	/**
	* 备选4
	*/
		private String def4;
	/**
	* 备选5
	*/
		private String def5;
	/**
	* 备选6
	*/
		private String def6;
	/**
	* 备选7
	*/
		private String def7;
	/**
	* 备选8
	*/
		private String def8;
	/**
	* 备选9
	*/
		private BigDecimal def9;
	/**
	* 备选10
	*/
		private BigDecimal def10;
	/**
	* 备选11
	*/
		private BigDecimal def11;
	/**
	* 备选12
	*/
		private BigDecimal def12;
	/**
	* 备选13
	*/
		private BigDecimal def13;
	/**
	* 备选14
	*/
	@DateTimeFormat(
		pattern = "yyyy-MM-dd HH:mm:ss"
	)
	@JsonFormat(
		pattern = "yyyy-MM-dd HH:mm:ss"
	)
		private Date def14;
	/**
	* 备选15
	*/
	@DateTimeFormat(
		pattern = "yyyy-MM-dd HH:mm:ss"
	)
	@JsonFormat(
		pattern = "yyyy-MM-dd HH:mm:ss"
	)
		private Date def15;
	/**
	* 备选16
	*/
	@DateTimeFormat(
		pattern = "yyyy-MM-dd HH:mm:ss"
	)
	@JsonFormat(
		pattern = "yyyy-MM-dd HH:mm:ss"
	)
		private Date def16;
	/**
	* 备选17
	*/
	@DateTimeFormat(
		pattern = "yyyy-MM-dd HH:mm:ss"
	)
	@JsonFormat(
		pattern = "yyyy-MM-dd HH:mm:ss"
	)
		private Date def17;
	/**
	* 备选18
	*/
	@JsonSerialize(
		using = ToStringSerializer.class
	)
		private Long def18;
	/**
	* 备选19
	*/
	@JsonSerialize(
		using = ToStringSerializer.class
	)
		private Long def19;
	/**
	* 备选20
	*/
	@JsonSerialize(
		using = ToStringSerializer.class
	)
		private Long def20;

	/**
	 * 评估师信息
	 */
	@TableField(exist = false)
	private List<AssetAppraiserInfo> assetAppraiserInfos;

	/**
	 * 评估价值
	 */
	@TableField(exist = false)
	private List<EvaluationValue> evaluationValues;

}
